range: Avoid miscalculating highlight allocation
authorMatthias Clasen <mclasen@redhat.com>
Sat, 26 Mar 2016 14:50:00 +0000 (10:50 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 26 Mar 2016 14:50:00 +0000 (10:50 -0400)
commite33188ad41095112a4342d570ab441f18d2e1416
treea45b07399d11a564886acbcc7553c3e6011c57b4
parent2374e2aa3b723c7352135b5a5964c96fff86a8f6
range: Avoid miscalculating highlight allocation

The slider gadget may be turned invisible as side-effect of
gtk_range_calc_slider(). If that happens,
gtk_css_gadget_get_content_allocation() returns { 0, 0, 0, 0},
which leads us to calculate a negative allocation for the highlight
node. Avoid this, by just reusing our already calculated slider
allocation in this case (it is not technically the same as the
content, allocation, but the difference hardly matter here.

https://bugzilla.gnome.org/show_bug.cgi?id=764022
gtk/gtkrange.c